package com.zys.exercise;

import java.util.ArrayList;

public class text1 {
    public static void main(String[] args) {
//        list.add("a1");
//        list.add("a1");
//        System.out.println(list);
//        System.out.println(list.add("2"));
//        System.out.println(list.set(1, "1"));
//        System.out.println(list);
//        for (int i = 0; i < list.size(); i++) {
//            String s = list.get(i);
//            System.out.print(s+" ");
//        }


//        System.out.println(list);
//        list.remove("2");
//        System.out.println(list.remove(0));
//        System.out.println(list);
//        System.out.println(list.remove("4"));
        ArrayList <student> list = new ArrayList<student>();
        student s1 = new student("zhangsan",18);
//        student s2 = new student("zhangsan",18);

        list.add(s1);
        list.add(s1);
        for (int i = 0; i < list.size(); i++) {
            student stu = list.get(i);
            System.out.println(stu);
        }

//        System.out.println(list);

    }
}
